﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;
using MixScriptWeb.Share;
using MixScript.BLL;
using MixScriptWeb.control;
using MixScript.BLL.FI;

namespace MixScriptWeb.Accounting
{
    public partial class fMappingMaterial : cCommonWeb, IMIxCommon // System.Web.UI.Page
    {

        private static cReferences oReff;
        public bool isvalid()
        {
            return true;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    LoadData();
                }

            }
            catch (Exception ex)
            {

                ShowStatusBar(ex.Message);
            }
        }
        protected void btnMap_click(object sender, EventArgs e)
        {
            if (txtaccountNo.Text != string.Empty)
            {
                cMappingMaterial oMm = new cMappingMaterial();
                oMm.Mapped(ddlmodul.SelectedValue.ToString(), txtaccountNo.Text);
                LoadData();
            }
        }
        private void LoadData()
        {

            FillDropDownList(ddlmodul, "vw_joid_module_v", "bpidnm", "codfbpid", true);

            cMappingMaterial oMm = new cMappingMaterial();
            addFindClickAttribute(this, new MixScriptTB[] { txtaccountNo }, new string[] { "SRCACC" });
            gvMapping.DataSource = oMm.List();
            gvMapping.DataBind();

        }


    }
}